package com.itheima.reggie.utils;

import java.util.Set;

/**
 * 线程工具类
 */
public class BaseContext{

    private BaseContext() {
    }

    //唯一维护对象 容器
    private static final ThreadLocal<Long> THREAD_LOCAL = new ThreadLocal<>();
    //存储long类型id
    public static void set(Long id){
        THREAD_LOCAL.set(id);
    }
    //获取  返回值long类型
    public static Long get(){
       return THREAD_LOCAL.get();
    }
}
